package main.Q2401_2500;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class Q2411_2420 {
	public static void main(String[] args) {
		System.out.println("Question2411：");
		System.out.println("Question2412：");
		System.out.println("Question2413：最小偶倍数");
		System.out.println("Question2414：");
		System.out.println("Question2415：");
		System.out.println("Question2416：");
		System.out.println("Question2417：");
		System.out.println("Question2418：按身高排序");
		System.out.println("Question2419：");
		System.out.println("Question2420：");
	}
}

class Question2413 {
	public int smallestEvenMultiple(int n) {
		if (n % 2 == 0) return n;
		else {
			while (n % 2 == 0) {
				n = n / 2;
			}
			return n * 2;
		}
	}
}

class Question2418 {
	class Person {
		String name;
		int height;
	}

	public String[] sortPeople(String[] names, int[] heights) {
		String[] result = new String[names.length];
		List<Person> personList = new ArrayList<>();
		for (int i = 0; i < names.length; i++) {
			Person person = new Person();
			person.height = heights[i];
			person.name = names[i];
			personList.add(person);
		}
		Collections.sort(personList, new Comparator<Person>() {
			@Override
			public int compare(Person o1, Person o2) {
				return o2.height - o1.height;
			}
		});
		for (int i = 0; i < names.length; i++) {
			result[i] = personList.get(i).name;
		}
		return result;
	}
}